﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Learning.Classifiers
{
    public class Attribute
    {
        private int m_Domain_Values; // number of different values in domain
        string m_Name;
        int m_index; // index in the data table

        public Attribute(string name, int Num_of_Vals_in_domain, int index)
        {
            if (name == null || name.Length == 0) throw new Exception("illigal name for att");
            if (Num_of_Vals_in_domain < 1) throw new Exception("illigal num of vals in domain");
            if (index < 0) throw new Exception("iligal index");
            m_Name = name;
            m_index = index;
            m_Domain_Values = (Num_of_Vals_in_domain);
        }

        public int get_index(){
            return m_index;
        }

        public string AttributeName
        {
            get
            {
                return m_Name;
            }
        }

        public int Num_of_vals
        {
            get
            {
                return m_Domain_Values;
            }
        }

    }
}
